import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-06-29
 * Time: 9:26
 */
public class test {
    public static void bubbleSort(int[] arry){
        boolean flg = false;
        for (int i = 0; i < arry.length-1; i++) {
            for (int j = 0; j < arry.length-1; j++) {
                if(arry[j] > arry[j + 1]){
                    int tmp = arry[j];
                    arry[j] = arry[j+1];
                    arry[j+1] = tmp;
                    flg = true;
                }
            }
            if (flg == false){
                break;
            }
        }
    }
    public static void main(String[] args) {
        int[] arry = {1,2,8,9,5,12,7,11};
        bubbleSort(arry);
        System.out.println(Arrays.toString(arry));
    }
    public static int binarySearch(int[] arry,int key){
        int left = 0;
        int right = arry.length;
        while (left <= right){
            int m = (left+right) / 2;
            if(arry[m] > key){
                right = m - 1;
            }else if(arry[m] < key){
                left = m + 1;
            }else{
                return m;
            }
        }
        return -1;
    }
    public static void main16(String[] args) {
        int[] arry = {1,2,3,4,5,6,7,8};
        int ret = binarySearch(arry,5);
        System.out.println(ret);
    }
    public static void func(int[] arry){
        int i = 0;
        int j = arry.length-1;
        while (i < j){
            while (i < j && arry[i] % 2 != 0){
                i++;
            }
            while (i < j && arry[j] % 2 == 0){
                j--;
            }
            if(i < j){
                int tmp = arry[i];
                arry[i] = arry[j];
                arry[j] = tmp;
            }
        }
    }
    public static void main15(String[] args) {
        int[] arry = {1,2,3,4,5};
        func(arry);
        System.out.println(Arrays.toString(arry));
    }
    public static int sum(int[] arry){
        int num = 0;
        for (int i = 0; i < arry.length; i++) {
            num += arry[i];
        }
        return num;
    }

    public static int avg(int[] arry){
        return sum(arry) / arry.length;
    }
    public static void main14(String[] args) {
        int[] arry = {1,2,3,4,5};
        int ret = avg(arry);
        System.out.println(ret);
    }
    public static void main13(String[] args) {
        int[] arry = {1,2,3,4,5};
        int ret = sum(arry);
        System.out.println(ret);
    }
    public static void transform(int[] arry){
        for (int i = 0; i < arry.length; i++) {
            arry[i] *= 2;
        }
    }
    public static void main12(String[] args) {
        int[] arry = {1,2,3};
        transform(arry);
        System.out.println(Arrays.toString(arry));
    }
    private static void printArray(int[] arry){
        for (int i = 0; i < arry.length; i++) {
            System.out.print(arry[i]+" ");
        }
    }
    public static void main11(String[] args) {
        int[] arry = new int[100];
        for (int i = 0; i < 100; i++) {
            arry[i] = i+1;
        }
        printArray(arry);
    }
    public static void main10(String[] args) {
        int[] arry = new int[100];
        for (int i = 0; i < 100; i++) {
            arry[i] = i+1;
        }
        System.out.println(Arrays.toString(arry));
    }
    public static double Max(double a,double b,double c){
        double max = a > b ? a : b;
        return max > c ? max : c;
    }
    public static int Max(int a,int b){
        return a > b ? a : b;
    }

    public static void main9(String[] args) {
        Scanner scanner = new Scanner(System.in);
  /*      int a = scanner.nextInt();
        int b = scanner.nextInt();*/
        double x = scanner.nextDouble();
        double y = scanner.nextDouble();
        double z = scanner.nextDouble();
        double ret2 = Max(x,y,z);
/*        int ret1 = Max(a,b);
        System.out.println(ret1);*/
        System.out.println(ret2);
    }
    public static double add(double a,double b,double c){
        return a + b + c;
    }
    public static int add(int a,int b){
        return a + b;
    }
    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //int a = scanner.nextInt();
        //int b = scanner.nextInt();
        double x = scanner.nextDouble();
        double y = scanner.nextDouble();
        double z = scanner.nextDouble();
        double ret2 = add(x,y,z);
        //int ret1 = add(a,b);
        //System.out.println(ret1);
        System.out.println(ret2);
    }
    public static int fib1(int n){
        if(n == 1){
            return 0;
        }
        if (n == 2) {
            return 1;
        }
        return fib1(n-1)+fib1(n-2);
    }
    public static int fib(int n){
        if(n == 1){
            return 0;
        }
        if(n == 2){
            return 1;
        }
        int f1 = 1;
        int f2 = 1;
        int f3 = -1;
        for (int i = 3; i < n; i++) {
            f3 = f1 + f2;
            f1 = f2;
            f2 = f3;
        }
        return f3;
    }
    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = fib1(n);
        System.out.println(ret);
    }
    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int tmp = 1;
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += main4(i);
        }
        System.out.println(sum);
    }
    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int tmp = 1;
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            tmp *= i;
            sum += tmp;
        }
        System.out.println(sum);
    }
    public static int main4(int n) {
        int sum = 1;
        for (int i = 1; i <= n; i++) {
            sum *= i;
        }
       return sum;
    }
    public static int Max3(int x,int y,int z){
        int max = Max2(x,y);
        return Max2(max,z);
    }
    public static int Max2(int x,int y){
        return x > y ? x : y;

    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int ret = Max2(a,b);
        int ret1 = Max3(a,b,c);
        //System.out.println(ret);
        System.out.println(ret1);
    }
    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextInt()) {
            int n = scan.nextInt();

            for(int i = 0;i < n;i++) {
                for(int j = 0;j < n;j++) {
                    if(i == j) {
                        System.out.print("*");
                    }else if( i+j+1 == n) {
                        System.out.print("*");
                    }else{
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }

    public static void main1(String[] args) {
        double sum = 0;
        int flg = 1;
        for (int i = 1; i <= 100 ; i++) {
            sum += 1.0 / i *flg;
            flg = -flg;
        }
        System.out.println(sum);
    }
/*    public static boolean func3(int[] arry){
        int count = 0;
        for (int i = 0; i < arry.length; i++) {
            if(arry[i] % 2 != 0){
                count++;
                if(count == 3){
                    return true;
                }
            }else {
                count = 0;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        int[] arry = {1,4,6,7,9,4};
        boolean ret = func3(arry);
        System.out.println(ret);
    }*/
/*    public static void main(String[] args) {
        int[] arry = {1,9,9,9,5,6,8,9,9};
        Arrays.sort(arry);
        System.out.println(arry[arry.length / 2]);
    }*/
/*    public int[] twoSun(int[] nums ,int target){
        int[] ret = new int[2];
        for (int left = 0; left < nums.length-1; left++) {
            for (int right = left+1; right < nums.length; right++) {
                if(nums[left] + nums[right] == target){
                    ret[0] = left;
                    ret[1] = right;
                    return ret;
                }
            }
        }
        return null;
    }*/

 /*   public static int func2(int[] arry){
        int sum = arry[0];
        for (int i = 0; i < arry.length; i++) {
            sum ^= arry[i];
        }
        return sum;
    }
    public static void main(String[] args) {
        int[] arry = {1,5,3,5,1};
        int ret = func2(arry);
        System.out.println(ret);
    }*/

/*    public static void func(int[] arry){
        int left = 0;
        int right = arry.length-1;
        while (left < right){
            while(left < right && arry[left] % 2 != 0){
                left++;
            }
            while (left < right && arry[right] % 2 == 0){
                right--;
            }
            if (left < right) {
                int tmp = arry[left];
                arry[left] = arry[right];
                arry[right] = tmp;
                left++;
                right--;
            }
        }
    }
    public static void main(String[] args) {
        int[] arry = {1,2,3,4,5,6};
        func(arry);
        System.out.println(Arrays.toString(arry));
    }*/
/*    public static void main(String[] args) {
        int[] arry = {1,2,3,4,5};
        rever(arry);
        System.out.println(Arrays.toString(arry));
    }
    public static void rever(int[] arry){
        int i = 0;
        int j = arry.length - 1;
        while (i < j){
            int tmp = arry[i];
            arry[i] = arry[j];
            arry[j] = tmp;
            i++;
            j--;
        }
    }*/
/*    public static int[] copy(int[] arry){
        int[] copuyy = new int[arry.length];
        for (int i = 0; i < arry.length; i++) {
            copuyy[i] = arry[i];
        }
        return copuyy;
    }


    public static void main(String[] args) {

        int[] arry = {1,2,3,4,5};
        int[] ret = copy(arry);
        System.out.println(Arrays.toString(arry));
    }*/
/*    public static int binarySearch(int[] arr,int key){
        int left = 0;
        int right = arr.length - 1;
        while (left <= right){
            int mid = (left + right) / 2;
            if(arr[mid] > key){
                right = mid - 1;
            }else if(arr[mid] < key){
                left = mid -1;
            }else {
                return mid;
            }
        }
        return -1;
    }

    public static void bubblesort(int[] arry){
        for (int i = 0; i < arry.length - 1; i++) {
            boolean flg = false;
            for (int j = 0; j < arry.length - 1; j++) {
                if(arry[j] > arry[j+1]){
                    int tmp = arry[j];
                    arry[j] = arry[j + 1];
                    arry[j + 1] = tmp;
                    flg = true;
                }
            }
            if(flg == false){
                break;
            }
        }
    }

    public static void main(String[] args) {
        int[] arry = {1,2,3,8,5,12,7,6};
        bubblesort(arry);
        System.out.println(Arrays.toString(arry));
        int ret = binarySearch(arry,6);
        System.out.println(ret);
    }*/
   /* public static void print(int[] arry){
        for (int x:arry) {
            System.out.print(x+" ");
        }
    }
    public static String myTostring(int[] arry){
        if(arry == null){
            return null;
        }
        String ret = "[";
        for (int i = 0; i < arry.length; i++) {
            ret += arry[i];
            if(i != arry.length){
                ret += ",";
            }
        }
        ret += "]";
        return ret;
    }
    public static void main(String[] args) {
        int[] arry = {1,2,3,4,5};
        //print(arry);

        String ret = myTostring(arry);
        System.out.println(Arrays.toString(arry));
    }
    public static void main1(String[] args) {
        int[] arry1 = {1,2,3,4,5};
        int[] arry2 = arry1;

        arry2[0] = 99;

        String ret1 = Arrays.toString(arry1);
        String ret2 = Arrays.toString(arry2);

        System.out.println(ret1);
        System.out.println(ret2);
    }*/
}
